package com.dhnsoft.代码随想录.字符串;

/**
 * ClassName: d01_344_反转字符串
 * Package: com.dhnsoft.代码随想录.字符串
 * Description:
 *
 * @Author dhn
 * @Create 2024/3/18 11:03
 * @Version 1.0
 */
public class d01_344_反转字符串 {

    public static void main(String[] args) {

    }

    public void reverseString(char[] s) {
        int i=0;
        int j=s.length-1;
        while (i<j){
            char temp = s[i];
            s[i] = s[j];
            s[j] = temp;
            i++;
            j--;
        }
    }
}
